<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
       <?php
       include 'receiver.php';
       include 'functions.php';

       include 'dbconf.php';
       include 'dbopen.php';

       $city = "lund";

       $result_getcities = mysql_query(getcities())
             or die ("ERROR: could not send/execute query getcities!".  mysql_error());

       while ($row = mysql_fetch_array($result_getcities)) {

                   $city = $row['answer'];

                   $result_getresult = mysql_query(getresult($city))
                         or die ("ERROR: could not send/execute query getresult!".  mysql_error());

                   while ($row = mysql_fetch_array($result_getresult)) {

                                    $number = $row['count(answer)'];
                    }

                   $cityresult = "$city: $number";

                   echo "$cityresult";
                   echo "<br>";
       }

       ?>

    </body>
</html>

